const tableService = require("./table.service");

class TableController {
    async queryTableList(ctx) {
        ctx.body = await tableService.queryTableList(ctx.request.query, ctx.state);
    }
	async createTable(ctx) {
		ctx.body = await tableService.createTable(ctx.request.body, ctx.state);
	}
	async createArea(ctx) {
		ctx.body = await tableService.createArea(ctx.request.body, ctx.state);
	}
	async queryTableAreaList(ctx) {
		ctx.body = await tableService.queryTableAreaList(ctx.request.body, ctx.state);
	}
	async createBillingRule(ctx) {
		ctx.body = await tableService.createBillingRule(ctx.request.body, ctx.state);
	}
	async setTableRule(ctx) {
		ctx.body = await tableService.setTableRule(ctx.request.params, ctx.request.body, ctx.state);
	}
	async getTableRule(ctx) {
		ctx.body = await tableService.getTableRule(ctx.request.params, ctx.request.body, ctx.state);
	}
	async getTableStatusQuantity(ctx) {
		ctx.body = await tableService.getTableStatusQuantity(ctx.request.params, ctx.request.body, ctx.state);
	}
}

module.exports = new TableController();
